<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use Zizaco\Entrust\EntrustPermission;
class Permission extends EntrustPermission
{
    //
	protected $table='permission';


//	获取所有权限菜单
	public function allmenu($permissionData){
		return $this->whereIn('id',$permissionData)
			->with('menu')->get();
	}

//	获取所有的菜单
	public function menu(){
		return $this->belongsTo('App\Model\Menu','menu_code');
	}


}
